package cn.file.test;

import java.io.File;



public class FileTest01 {
  public static void main(String args[]){

      toA(new File("D:/Home"),0);
  }
  public static void toA(File files,int index){
      for (int i=0;i<index;i++){
          System.out.print("*");
      }
      System.out.println(files.getName());
      if(null==files || !files.exists()){
          return;
      }else{
          if(files.isDirectory())
              for (File file:files.listFiles()){
              toA(file,index+1);
              }
      }
  }
}
